该组件提供了一个高度可定制的界面,用于创建和展示多种类型的图表。本文档详细说明了如何使用 Chart
视图的属性来配置轴、比例、标签、图例等。
chartXAxis
"automatic" | "hidden" | "visible"
chartYAxis
"automatic" | "hidden" | "visible"
chartXAxisLabel
chartYAxisLabel
chartXAxisLabel
相同。chartLegend
chartXScale
/ chartYScale
chartBackground
chartForegroundStyleScale
chartScrollableAxes
chartXSelection
/ chartYSelection
/ chartAngleSelection
chartScrollPositionX
/ chartScrollPositionY
以下示例展示了如何使用多个属性来创建一个完全自定义的图表:
此示例在单个 Chart
容器中结合了轴标签、滚动、图例、比例、前景样式以及多种图表类型。可将其用作构建自定义图表的模板。